package com.xy.blog.user.dao.impl;

import com.github.pagehelper.PageHelper;
import com.xy.blog.core.dao.IBaseCommonDao;
import com.xy.blog.core.exception.BaseException;
import com.xy.blog.core.springmvc.result.page.PageReq;
import com.xy.blog.core.springmvc.result.page.PageResp;
import com.xy.blog.user.controller.model.req.query.SysInfoQuery;
import com.xy.blog.user.dao.ISysInfoDao;
import com.xy.blog.user.dao.mapper.SysInfoMapper;
import com.xy.blog.user.dao.model.SysInfoDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author zanhonglei
 * @version V1.0
 * @Description:
 * @date 2020/3/4
 */
@Repository
public class SysInfoDaoImpl implements IBaseCommonDao<SysInfoDO, SysInfoQuery>, ISysInfoDao {

    @Autowired
    private SysInfoMapper sysInfoMapper;

    @Override
    public PageResp<SysInfoDO> listByPage(PageReq<SysInfoQuery> req) throws BaseException {
        PageHelper.startPage(req);
        List<SysInfoDO> sysInfoDOS = sysInfoMapper.selectAll();
        return PageResp.data(sysInfoDOS);
    }

    @Override
    public List<SysInfoDO> select(SysInfoDO item) {
        return null;
    }

    @Override
    public int selectCount(SysInfoDO item) {
        return 0;
    }

    @Override
    public void save(SysInfoDO item) throws BaseException {
    }

    @Override
    public void updateById(SysInfoDO item) throws BaseException {

    }

    @Override
    public void deleteById(Long id) throws BaseException {

    }

    @Override
    public SysInfoDO getById(Long id) throws BaseException {

        return null;
    }


    @Override
    public List<SysInfoDO> selectAll() {
       return sysInfoMapper.selectAll();
    }
}
